<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="author" content="esy">
    
    <meta name="description" content="esy">
    
    
    
    
    
    
    <title>数学建模问题1 | ESY</title>
    <link href="https://esyyes.github.io" rel="prefetch" />

    
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/aos.css">
<link rel="stylesheet" href="/css/style.css">

    
<script src="/js/jquery.min.js"></script>

    
<script src="/js/bootstrap.min.js"></script>

    
<script src="/js/aos.js"></script>

    
<script src="/js/highslide/highslide-full.min.js"></script>

    
<link rel="stylesheet" href="/js/highslide/highslide.css">

    <style type="text/css">
        @media (max-width: 768px) {
            body {
                background-color: #f0f0f0;
                background: url('/imgs/xsbg.gif');
                background-attachment: fixed;
            }
        }
    </style>
    
    <!--<script type="text/javascript">
      if (document.images) {
        var avatar = new Image();
        avatar.src = '/imgs/avatar.jpg'
        var previews = 'preview1.jpg,preview2.jpg,preview3.jpg,preview4.jpg'.split(',')
        var previewsPreLoad = []
        for(var i = 0; i < length; i++) {
          previewsPreLoad.push(new Image())
          previewsPreLoad[previewsPreLoad.length - 1].src = '/imgs/preview' + previews[i]
        }
      }
    </script>-->
<meta name="generator" content="Hexo 5.2.0"></head>
<body>
    <!-- 背景轮播图功能 -->
    <section class="hidden-xs">
    <ul class="cb-slideshow">
        <li><span>天若</span></li>
        <li><span>有情</span></li>
        <li><span>天亦老</span></li>
        <li><span>我为</span></li>
        <li><span>长者</span></li>
        <li><span>续一秒</span></li>
    </ul>
</section>
    <!-- 欧尼酱功能, 谁用谁知道 -->
    
    <div class="gal-menu gal-dropdown">
    <div class="circle" id="gal">
        <div class="ring">
            <a href="https://esyyes.github.io" class="menuItem" style="left: 50%; top: 15%;">首页</a>
            
            <a class="menuItem" style="left: 80.3109%; top: 32.5%;">下一页</a>
            
            <a href="/archives" class="menuItem" style="left: 80.3109%; top: 67.5%;">归档</a>
            <a href="/about" class="menuItem" style="left: 50%; top: 85%;">关于</a>
            <a href="/message" class="menuItem" style="left: 19.6891%; top: 67.5%;">留言板</a>

            
            <a class="menuItem" style="left: 19.6891%; top: 32.5%;">上一页</a>
            
        </div>
        <audio id="audio" src="/imgs/oni.mp3"></audio>
    </div>
</div>
    
    <header class="navbar navbar-inverse" id="gal-header">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target=".bs-navbar-collapse"
                    aria-expanded="false">
                <span class="fa fa-lg fa-reorder"></span>
            </button>
            <a href="https://esyyes.github.io">
                
                <style>
                    #gal-header .navbar-brand {
                        height: 54px;
                        line-height: 24px;
                        font-size: 28px;
                        opacity: 1;
                        background-color: rgba(0,0,0,0);
                        text-shadow: 0 0 5px #fff,0 0 10px #fff,0 0 15px #fff,0 0 20px #228DFF,0 0 35px #228DFF,0 0 40px #228DFF,0 0 50px #228DFF,0 0 75px #228DFF;
                    }
                </style>
                <!-- 这里使用文字(navbar_text or config.title) -->
                <div class="navbar-brand">ESY</div>
                
            </a>
        </div>
        <div class="collapse navbar-collapse bs-navbar-collapse">
            <ul class="nav navbar-nav" id="menu-gal">
                
                
                <li class="">
                    <a href="/">
                        <i class="fa fa-home"></i>首页
                    </a>
                </li>
                
                
                
                <li class="">
                    <a href="/archives">
                        <i class="fa fa-archive"></i>归档
                    </a>
                </li>
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-list"></i>分类
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/categories/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/categories/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/categories/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo%E5%AE%8C%E5%96%84/">-hexo完善</a>
                        </li>
                        
                        
                        <li>
                            <a href="/categories">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-tags"></i>标签
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/tags/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/tags/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/tags/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/">-个人博客搭建</a>
                        </li>
                        
                        
                        <li>
                            <a href="/tags">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                <li class="">
                    <a href="/about">
                        <i class="fa fa-user"></i>关于我
                    </a>
                </li>
                
                
            </ul>
        </div>
    </div>
</header>
    <div id="gal-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 gal-right" id="mainstay">
                    
<article class="article well article-body" id="article">
    <div class="breadcrumb">
        <i class="fa fa-home"></i>
        <a href="https://esyyes.github.io">ESY</a>
        >
        <span>数学建模问题1</span>
    </div>
    <!-- 大型设备详细文章 -->
    <div class="hidden-xs">
        <div class="title-article">
            <h1>
                <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/">数学建模问题1</a>
            </h1>
        </div>
        <div class="tag-article">
            
            <span class="label label-gal">
                <i class="fa fa-tags"></i>
                
                <a href="/tags/mathematical-modeling/">mathematical modeling</a>
                
            </span>
            
            <span class="label label-gal">
                <i class="fa fa-calendar"></i> 2020-09-25
            </span>
            
        </div>
    </div>
    <!-- 小型设备详细文章 -->
    <div class="visible-xs">
        <center>
            <div class="title-article">
                <h4>
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/">数学建模问题1</a>
                </h4>
            </div>
            <p>
                <i class="fa fa-calendar"></i> 2020-09-25
            </p>
            <p>
                
                <i class="fa fa-tags"></i>
                
                <a href="/tags/mathematical-modeling/">mathematical modeling</a>
                
                
                
            </p>
        </center>
    </div>
    <div class="content-article">
        <h1 id="数学建模问题1"><a href="#数学建模问题1" class="headerlink" title="数学建模问题1"></a>数学建模问题1</h1><p>想通过提取P300和结合RF回归模型进去预测</p>
<p>问题一：**  在脑-机接口系统中既要考虑目标的分类准确率，同时又要保证一定的信息传输速率。请根据附件1所给数据，<strong>设计或采用一个方法，在尽可能使用较少轮次（要求轮次数小于等于**</strong>5）的测试数据<strong>的情况下，找出附件1中5个被试测试集中的</strong>10个待识别目标**，并给出具体的分类识别过程，可与几种方法进行对比，来说明设计方法的合理性。  </p>
<h2 id="查看频率的波段"><a href="#查看频率的波段" class="headerlink" title="查看频率的波段"></a>查看频率的波段</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/9/18</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</span><br><span class="line"><span class="keyword">from</span> scipy.signal <span class="keyword">import</span> savgol_filter, firwin, lfilter</span><br><span class="line"><span class="keyword">from</span> scipy.fftpack <span class="keyword">import</span> fft</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">get_fft_values</span>(<span class="params">y_values, T, N, f_s</span>):</span></span><br><span class="line">    f_values = np.linspace(<span class="number">0.0</span>, <span class="number">1.0</span>/(<span class="number">2.0</span>*T), N//<span class="number">2</span>)</span><br><span class="line">    fft_values_ = fft(y_values)</span><br><span class="line">    fft_values = <span class="number">2.0</span>/N * np.<span class="built_in">abs</span>(fft_values_[<span class="number">0</span>:N//<span class="number">2</span>])</span><br><span class="line">    <span class="keyword">return</span> f_values, fft_values</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&#x27;ignore&#x27;</span>)</span><br><span class="line"></span><br><span class="line">sheet_names = np.array(pd.read_excel(<span class="string">&#x27;E:/EEG数据/sheet name.xlsx&#x27;</span>))</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> name <span class="keyword">in</span> sheet_names[<span class="number">0</span>]:</span><br><span class="line">    data = pd.read_excel(<span class="string">&#x27;E:/EEG数据/S1/S1_train_data.xlsx&#x27;</span>, header=<span class="number">0</span>, sheet_name=name)</span><br><span class="line">    data.columns = [np.arange(<span class="number">1</span>, <span class="number">21</span>)]</span><br><span class="line">    feature = pd.DataFrame(data, columns=data.keys())</span><br><span class="line">    ha = []</span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(feature)):</span><br><span class="line">        ha.append(np.array(feature[<span class="number">1</span>])[i][<span class="number">0</span>])</span><br><span class="line"></span><br><span class="line">    f_values, fft_values = get_fft_values(savgol_filter(ha, <span class="number">53</span>, <span class="number">3</span>), <span class="number">0.04</span>, <span class="built_in">len</span>(ha), <span class="number">250</span>)</span><br><span class="line">    plt.plot(f_values, fft_values, linestyle=<span class="string">&#x27;-&#x27;</span>, color=<span class="string">&#x27;blue&#x27;</span>)</span><br><span class="line">    plt.xlabel(<span class="string">&#x27;Frequency [Hz]&#x27;</span>, fontsize=<span class="number">16</span>)</span><br><span class="line">    plt.ylabel(<span class="string">&#x27;Amplitude&#x27;</span>, fontsize=<span class="number">16</span>)</span><br><span class="line">    plt.title(<span class="string">&quot;Frequency domain of the signal&quot;</span>, fontsize=<span class="number">16</span>)</span><br><span class="line">    plt.show()</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="进行低通滤波"><a href="#进行低通滤波" class="headerlink" title="进行低通滤波"></a>进行低通滤波</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/9/18</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</span><br><span class="line"><span class="keyword">from</span> scipy.signal <span class="keyword">import</span> savgol_filter, firwin, lfilter</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&#x27;ignore&#x27;</span>)</span><br><span class="line"></span><br><span class="line">sheet_names = np.array(pd.read_excel(<span class="string">&#x27;E:/EEG数据/sheet name.xlsx&#x27;</span>))</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> name <span class="keyword">in</span> sheet_names[<span class="number">0</span>]:</span><br><span class="line">    data = pd.read_excel(<span class="string">&#x27;E:/EEG数据/S1/S1_train_data.xlsx&#x27;</span>, header=<span class="number">0</span>, sheet_name=name)</span><br><span class="line">    data.columns = [np.arange(<span class="number">1</span>, <span class="number">21</span>)]</span><br><span class="line">    feature = pd.DataFrame(data, columns=data.keys())</span><br><span class="line">    low_pass = firwin(numtaps=<span class="number">3</span>, cutoff=<span class="number">30</span>, nyq=<span class="number">125</span>)</span><br><span class="line">    y = lfilter(low_pass, <span class="number">1</span>, feature[<span class="number">1</span>])</span><br><span class="line">    fig1 = plt.figure(figsize=(<span class="number">8</span>, <span class="number">6</span>))</span><br><span class="line">    plt.plot(y)</span><br><span class="line">    plt.show()</span><br><span class="line"></span><br><span class="line">    fig2 = plt.figure(figsize=(<span class="number">8</span>, <span class="number">6</span>))</span><br><span class="line">    plt.plot(feature[<span class="number">1</span>])</span><br><span class="line">    plt.show()</span><br></pre></td></tr></table></figure>

<h2 id="模型进行预测"><a href="#模型进行预测" class="headerlink" title="模型进行预测"></a>模型进行预测</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/9/20</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"><span class="keyword">from</span> sklearn <span class="keyword">import</span> preprocessing</span><br><span class="line"><span class="keyword">from</span> sklearn.model_selection <span class="keyword">import</span> train_test_split</span><br><span class="line"><span class="keyword">from</span> sklearn.metrics <span class="keyword">import</span> accuracy_score, cohen_kappa_score</span><br><span class="line"><span class="keyword">from</span> sklearn.svm <span class="keyword">import</span> SVC</span><br><span class="line"><span class="keyword">from</span> sklearn.ensemble <span class="keyword">import</span> RandomForestClassifier</span><br><span class="line"><span class="keyword">from</span> sklearn.externals <span class="keyword">import</span> joblib</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 整体数据预测</span></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&#x27;ignore&#x27;</span>)</span><br><span class="line"></span><br><span class="line">text = <span class="string">&#x27;S1&#x27;</span></span><br><span class="line">featrue = pd.read_excel(<span class="string">&quot;E:/EEG数据/label/&quot;</span> + <span class="string">&quot;%s&quot;</span> % text + <span class="string">&quot;_std_train_data.xlsx&quot;</span>)</span><br><span class="line">labels = pd.read_excel(<span class="string">&quot;E:/EEG数据/label/&quot;</span> + <span class="string">&quot;%s&quot;</span> % text + <span class="string">&quot;_all_train_label.xlsx&quot;</span>)[<span class="string">&#x27;label&#x27;</span>]</span><br><span class="line"></span><br><span class="line">num = <span class="number">13</span></span><br><span class="line">test_data = pd.read_excel(<span class="string">&quot;E:/EEG数据/&quot;</span> + <span class="string">&quot;%s&quot;</span> % text + <span class="string">&quot;/%s&quot;</span> % text + <span class="string">&quot;_test_data.xlsx&quot;</span>, header=<span class="literal">None</span>,</span><br><span class="line">                          sheet_name=<span class="string">&#x27;char&#x27;</span> + <span class="string">&#x27;%d&#x27;</span> % num)</span><br><span class="line"></span><br><span class="line">test_event = pd.read_excel(<span class="string">&#x27;E:/EEG数据/&#x27;</span> + <span class="string">&#x27;%s&#x27;</span> % text + <span class="string">&#x27;/%s&#x27;</span> % text + <span class="string">&#x27;_test_event.xlsx&#x27;</span>, header=<span class="literal">None</span>,</span><br><span class="line">                           sheet_name=<span class="string">&#x27;char&#x27;</span> + <span class="string">&#x27;%d&#x27;</span> % num)</span><br><span class="line">std_test = preprocessing.scale(np.array(test_data).tolist())</span><br><span class="line">clf = RandomForestClassifier()</span><br><span class="line">X_train, X_test, Y_train, Y_test = train_test_split(featrue.iloc[:, <span class="number">1</span>:], labels,</span><br><span class="line">                                                    stratify=labels, test_size=<span class="number">0.3</span>)</span><br><span class="line">clf.fit(X_train, Y_train)</span><br><span class="line">Y_pred = clf.predict(X_test)</span><br><span class="line">acr = accuracy_score(Y_test, Y_pred)</span><br><span class="line">print(acr)</span><br><span class="line"></span><br><span class="line">pred_y = clf.predict(X_test)</span><br><span class="line">locs = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(pred_y)):</span><br><span class="line">    <span class="keyword">if</span> pred_y[i] == <span class="number">1</span>:</span><br><span class="line">        locs.append(i)</span><br><span class="line">print(locs)</span><br><span class="line"></span><br><span class="line">now = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(locs)):</span><br><span class="line">    <span class="keyword">if</span> locs[i] &lt; <span class="number">330</span>:</span><br><span class="line">        <span class="keyword">pass</span></span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">        now.append(locs[i])</span><br><span class="line"></span><br><span class="line">char = []</span><br><span class="line">char_f = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">66</span>):</span><br><span class="line">    <span class="keyword">if</span> test_event[<span class="number">0</span>][i] == <span class="number">666</span> <span class="keyword">or</span> test_event[<span class="number">0</span>][i] == <span class="number">100</span>:</span><br><span class="line">        <span class="keyword">pass</span></span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">        char.append(test_event[<span class="number">1</span>][i])</span><br><span class="line">        char_f.append(test_event[<span class="number">0</span>][i])</span><br><span class="line"></span><br><span class="line">list_event = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(now)):</span><br><span class="line">    <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(char)):</span><br><span class="line">        <span class="keyword">if</span> <span class="number">80</span> &lt; now[i] - char[j] &lt; <span class="number">120</span>:</span><br><span class="line">            list_event.append(char_f[j])</span><br><span class="line">print(list_event)</span><br><span class="line"><span class="comment"># joblib.dump(clf, &quot;my_model.pkl&quot;)</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="20个通道的P300"><a href="#20个通道的P300" class="headerlink" title="20个通道的P300"></a>20个通道的P300</h2><figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">clc;clear;close all</span><br><span class="line">[~, Sheet, ~] = xlsfinfo(<span class="string">&#x27;E:\EEG数据\S1\S1_test_data.xlsx&#x27;</span>);</span><br><span class="line"><span class="keyword">for</span> index = <span class="number">1</span> : <span class="built_in">length</span>(Sheet)</span><br><span class="line">    eeg_data = xlsread(<span class="string">&#x27;E:\EEG数据\S1\S1_test_data.xlsx&#x27;</span>, Sheet&#123;index&#125;);</span><br><span class="line">    <span class="built_in">i</span> = <span class="number">1</span>;</span><br><span class="line">    <span class="keyword">while</span> <span class="built_in">i</span> &lt; <span class="number">21</span></span><br><span class="line">        epoch_eeg = eeg_data(:, <span class="built_in">i</span>);</span><br><span class="line">        [QRS_pks, QRS_locs, delay] = pan_tompkin(epoch_eeg, <span class="number">250</span>, <span class="number">0</span>);</span><br><span class="line">        all_locs(<span class="built_in">i</span>, :) = &#123;QRS_locs&#125;;</span><br><span class="line">        <span class="built_in">i</span> = <span class="built_in">i</span> + <span class="number">1</span>;</span><br><span class="line">    <span class="keyword">end</span></span><br><span class="line">    all_sheet(index, :) = all_locs;</span><br><span class="line"><span class="keyword">end</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="20个通道叠加后的P300"><a href="#20个通道叠加后的P300" class="headerlink" title="20个通道叠加后的P300"></a>20个通道叠加后的P300</h2><figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">clc;clear;close all</span><br><span class="line">[~, Sheet, ~] = xlsfinfo(<span class="string">&#x27;E:\EEG数据\S1\S1_test_data.xlsx&#x27;</span>);</span><br><span class="line"><span class="keyword">for</span> index = <span class="number">1</span> : <span class="built_in">length</span>(Sheet)</span><br><span class="line">    filename = [<span class="string">&#x27;E:\EEG数据\avg_epoch\S1_avg_&#x27;</span>, Sheet&#123;index&#125;, <span class="string">&#x27;_test.xlsx&#x27;</span>];</span><br><span class="line">    avg_eeg = xlsread(filename);</span><br><span class="line">    eeg = avg_eeg(<span class="number">2</span>:<span class="keyword">end</span>, <span class="number">2</span>);</span><br><span class="line">    [QRS_pks1, QRS_locs1, delay1] = pan_tompkin(eeg, <span class="number">250</span>, <span class="number">0</span>);</span><br><span class="line">    avg_locs(index, :) = &#123;QRS_locs1&#125;;</span><br><span class="line"><span class="keyword">end</span></span><br></pre></td></tr></table></figure>



<h2 id="生成20个通道的叠加"><a href="#生成20个通道的叠加" class="headerlink" title="生成20个通道的叠加"></a>生成20个通道的叠加</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/9/18</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</span><br><span class="line"><span class="keyword">from</span> scipy.signal <span class="keyword">import</span> savgol_filter, firwin, lfilter</span><br><span class="line"><span class="keyword">from</span> sklearn <span class="keyword">import</span> preprocessing</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&#x27;ignore&#x27;</span>)</span><br><span class="line"><span class="comment"># 解决中文显示问题</span></span><br><span class="line">plt.rcParams[<span class="string">&#x27;font.sans-serif&#x27;</span>] = [<span class="string">&#x27;SimHei&#x27;</span>]</span><br><span class="line"></span><br><span class="line">sheet_names = np.array(pd.read_excel(<span class="string">&#x27;E:/EEG数据/sheet name.xlsx&#x27;</span>))</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> name <span class="keyword">in</span> sheet_names[<span class="number">0</span>]:</span><br><span class="line">    data = pd.read_excel(<span class="string">&#x27;E:/EEG数据/S1/S1_train_data.xlsx&#x27;</span>, header=<span class="number">0</span>, sheet_name=name)</span><br><span class="line">    data.columns = [np.arange(<span class="number">1</span>, <span class="number">21</span>)]</span><br><span class="line">    <span class="comment"># 化为标准差</span></span><br><span class="line">    <span class="comment"># 再去基飘</span></span><br><span class="line">    <span class="comment"># 叠加</span></span><br><span class="line">    <span class="comment"># 最后分段</span></span><br><span class="line">    <span class="comment"># 将数据化为标准差</span></span><br><span class="line">    feature = pd.DataFrame(preprocessing.scale(data), columns=data.keys())</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 对全部数据进行低通滤波</span></span><br><span class="line">    epoch = []</span><br><span class="line">    <span class="comment"># fig = plt.figure(figsize=(10, 8))</span></span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>, <span class="number">21</span>):</span><br><span class="line">        <span class="comment"># 低通滤波</span></span><br><span class="line">        low_feature = lfilter(firwin(numtaps=<span class="number">3</span>, cutoff=<span class="number">30</span>, nyq=<span class="number">125</span>), <span class="number">1</span>, feature[i])</span><br><span class="line">        <span class="comment"># plt.plot(low_feature)</span></span><br><span class="line">        epoch.append(low_feature)</span><br><span class="line">    <span class="comment"># plt.show()</span></span><br><span class="line"></span><br><span class="line">    <span class="comment"># 去基飘</span></span><br><span class="line">    all_diff = []</span><br><span class="line">    <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>, <span class="built_in">len</span>(epoch)):</span><br><span class="line">        char01_diff = []</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(feature)<span class="number">-251</span>):</span><br><span class="line">            char01_diff.append(np.array(feature[j])[<span class="number">251</span>+i] - np.array(feature[j])[i:<span class="number">250</span>+i].mean())</span><br><span class="line">        all_diff.append(char01_diff)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 叠加epoch</span></span><br><span class="line">    avg_epoch = []</span><br><span class="line">    <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(epoch[<span class="number">0</span>])):</span><br><span class="line">        epcoh_mean = []</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(epoch)):</span><br><span class="line">            epcoh_mean.append(epoch[i][j][<span class="number">0</span>])</span><br><span class="line">        one_data = np.array(epcoh_mean).mean()</span><br><span class="line">        avg_epoch.append(one_data)</span><br><span class="line">    datas = pd.DataFrame(avg_epoch)</span><br><span class="line">    <span class="comment"># datas.to_excel(&quot;avg_&quot; + &quot;%s&quot; % name + &quot;.xlsx&quot;)</span></span><br><span class="line">    fig2 = plt.figure(figsize=(<span class="number">10</span>, <span class="number">8</span>))</span><br><span class="line">    plt.plot(avg_epoch, <span class="string">&quot;r-&quot;</span>, label=<span class="string">&#x27;平滑前&#x27;</span>)</span><br><span class="line">    plt.plot(savgol_filter(avg_epoch, <span class="number">41</span>, <span class="number">3</span>), <span class="string">&quot;b&quot;</span>, label=<span class="string">&#x27;平滑后&#x27;</span>)</span><br><span class="line">    plt.xlabel(<span class="string">&quot;采样点&quot;</span>, fontsize=<span class="number">18</span>)</span><br><span class="line">    plt.xticks(fontsize=<span class="number">12</span>)</span><br><span class="line">    plt.ylabel(<span class="string">&quot;幅值&quot;</span>, fontsize=<span class="number">18</span>)</span><br><span class="line">    plt.yticks(fontsize=<span class="number">12</span>)</span><br><span class="line">    plt.legend(fontsize=<span class="number">12</span>)</span><br><span class="line">    plt.show()</span><br><span class="line">    fig2.savefig(<span class="string">&#x27;epoch.png&#x27;</span>, dpi=<span class="number">800</span>, bbox_inches=<span class="string">&#x27;tight&#x27;</span>)</span><br></pre></td></tr></table></figure>





<h2 id="生成标签"><a href="#生成标签" class="headerlink" title="生成标签"></a>生成标签</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/9/18</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&#x27;ignore&#x27;</span>)</span><br><span class="line"></span><br><span class="line">sheet_names = np.array(pd.read_excel(<span class="string">&#x27;E:/EEG数据/sheet name.xlsx&#x27;</span>))</span><br><span class="line"></span><br><span class="line">text = <span class="string">&#x27;S1&#x27;</span></span><br><span class="line"><span class="keyword">for</span> num <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">13</span>, <span class="number">18</span>):</span><br><span class="line">    n = [<span class="number">3</span>, <span class="number">1</span>, <span class="number">6</span>, <span class="number">5</span>, <span class="number">2</span>]</span><br><span class="line">    m = [<span class="number">7</span>, <span class="number">12</span>, <span class="number">7</span>, <span class="number">10</span>, <span class="number">9</span>]</span><br><span class="line">    <span class="keyword">for</span> name <span class="keyword">in</span> sheet_names[num<span class="number">-1</span>]:</span><br><span class="line">        data = pd.read_excel(<span class="string">&#x27;E:/EEG数据/&#x27;</span> + <span class="string">&#x27;%s&#x27;</span> % text + <span class="string">&#x27;/%s&#x27;</span> % text + <span class="string">&#x27;_test_event.xlsx&#x27;</span>, header=<span class="literal">None</span>,</span><br><span class="line">                             sheet_name=<span class="string">&#x27;char&#x27;</span> + <span class="string">&#x27;%d&#x27;</span> % num)</span><br><span class="line">        train_data = pd.read_excel(<span class="string">&quot;E:/EEG数据/&quot;</span> + <span class="string">&quot;%s&quot;</span> % text + <span class="string">&quot;/%s&quot;</span> % text + <span class="string">&quot;_test_data.xlsx&quot;</span>, header=<span class="literal">None</span>,</span><br><span class="line">                                   sheet_name=<span class="string">&#x27;char&#x27;</span> + <span class="string">&#x27;%d&#x27;</span> % num)</span><br><span class="line">        char = []</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">66</span>):</span><br><span class="line">            <span class="keyword">if</span> data[<span class="number">0</span>][i] == n[num<span class="number">-13</span>]:</span><br><span class="line">                char.append(data[<span class="number">1</span>][i])</span><br><span class="line">            <span class="keyword">elif</span> data[<span class="number">0</span>][i] == m[num<span class="number">-13</span>]:</span><br><span class="line">                char.append(data[<span class="number">1</span>][i])</span><br><span class="line"></span><br><span class="line">        tag = []</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(train_data)):</span><br><span class="line">            <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">10</span>):</span><br><span class="line">                <span class="keyword">if</span> char[j] + <span class="number">80</span> &lt;= i &lt; char[j] + <span class="number">120</span>:</span><br><span class="line">                    tag.append(i)</span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                tag.append(<span class="number">0</span>)</span><br><span class="line">        tf = <span class="built_in">list</span>(<span class="built_in">set</span>(tag))</span><br><span class="line">        tf.remove(<span class="number">0</span>)</span><br><span class="line"></span><br><span class="line">        label = []</span><br><span class="line">        <span class="keyword">for</span> nums <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(train_data)):</span><br><span class="line">            c = <span class="number">0</span></span><br><span class="line">            <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(tf)):</span><br><span class="line">                <span class="keyword">if</span> tf[j] == nums:</span><br><span class="line">                    c = <span class="number">1</span></span><br><span class="line">            label.append(c)</span><br><span class="line">        labels = pd.DataFrame(label, columns=[<span class="string">&#x27;label&#x27;</span>])</span><br><span class="line">        labels.to_excel(<span class="string">&quot;E:/EEG数据/label/&quot;</span> + <span class="string">&quot;%s&quot;</span> % text + <span class="string">&quot;_%s&quot;</span> % name + <span class="string">&quot;_label.xlsx&quot;</span>)</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<p><img src="../images/timg-1601018934159.jpg"></p>

    </div>
</article>


                </div>
                <aside class="col-md-4 gal-left" id="sidebar">
    <!-- 此为sidebar的搜索框, 非搜索结果页面 -->
<aside id="sidebar-search">
    <div class="search hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <form class="form-inline clearfix" id="search-form" method="get"
              action="/search/index.html">
            <input type="text" name="s" class="form-control" id="searchInput" placeholder="搜索文章~" autocomplete="off">
            <button class="btn btn-danger btn-gal" type="submit">
                <i class="fa fa-search"></i>
            </button>
        </form>
    </div>
</aside>
    <aside id="sidebar-author">
    <div class="panel panel-gal" data-aos="flip-right" data-aos-duration="3000">
        <div class="panel-heading" style="text-align: center">
            <i class="fa fa-quote-left"></i>
            esy
            <i class="fa fa-quote-right"></i>
        </div>
        <div class="author-panel text-center">
            <img src="/imgs/avatar.jpg" width="140" height="140"
                 alt="个人头像" class="author-image">
            <p class="author-description"><p>esy</p>
</p>
        </div>
    </div>
</aside>
    
    <aside id="sidebar-recent_comments">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-comments"></i>
            最新评论
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush"></ul>
    </div>
</aside>
    
    <!-- 要配置好leancloud才能开启此小工具 -->
    
    
    <aside id="sidebar-recent_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            近期文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E6%9C%80%E5%B0%8F%E4%BA%8C%E4%B9%98%E6%B3%95/">最小二乘法</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E7%BB%9F%E8%AE%A1%E5%AD%A6%E4%B9%A0-%E7%AC%AC%E4%B8%80%E7%AB%A0/">统计学习--第一章</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/04/python%20work/hello-world/">Hello World</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/03/python%20work/%E5%88%86%E7%B1%BB%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AF%84%E4%BC%B0%E6%8C%87%E6%A0%87/">分类模型的评估指标</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/10/21/python%20work/10-21-%E7%88%AC%E8%99%AB%E5%9F%BA%E7%A1%80/">10-21 爬虫基础</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/CRF%E7%9A%84%E6%95%B4%E4%BD%93%E6%B5%81%E7%A8%8B%E7%BB%93%E6%9E%9C/">CRF的整体流程结果</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/nlp-crf%E6%A8%A1%E5%9E%8B/">nlp_crf模型</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%983/">数学建模问题3</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%982/">数学建模问题2</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/">数学建模问题1</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="sidebar-rand_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            随机文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/08/python%20work/ECG%E4%BF%A1%E5%8F%B7%E8%AF%BB%E5%8F%96/">ECG信号读取</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/04/12/python%20work/python-Matplotlib%E8%A7%86%E9%A2%91%E8%AE%B2%E8%A7%A3%E7%89%88/">python-Matplotlib视频讲解版</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/05/26/python%20work/python-%E5%85%A5%E9%97%A8%E5%A4%8D%E4%B9%A0%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/">python-入门复习面向对象</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/12/08/python%20work/python%E5%9F%BA%E7%A1%80%E4%B9%8B%E5%88%97%E8%A1%A8/">LV-2</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/12/01/python%20work/python%E5%9F%BA%E7%A1%80%E4%B9%8B%E7%BB%98%E5%88%B6%E5%88%97%E8%A1%A8%E6%96%87%E4%BB%B6/">LV-1</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/11/python%20work/%E5%85%A8%E9%83%A8%E7%89%B9%E5%BE%81%E7%9A%84%E6%8F%90%E5%8F%96%E5%92%8C%E6%A0%87%E7%AD%BE%E5%A4%84%E7%90%86/">全部特征的提取和标签处理</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/27/python%20work/%E5%88%86%E5%B1%82%E6%8A%BD%E6%A0%B7%E5%92%8C%E6%AC%A0%E6%8B%9F%E5%90%88%E6%88%96%E8%BF%87%E6%8B%9F%E5%90%88/">分层抽样和欠拟合或过拟合</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/08/python%20work/%E5%9C%A8UI%E7%95%8C%E9%9D%A2%E4%B8%AD%E5%8A%A0%E5%85%A5%E6%97%B6%E9%97%B4%E6%B5%8B%E8%AF%95/">在UI界面中加入时间测试</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/07/python%20work/%E6%95%B0%E6%8D%AE%E9%9B%86%E4%BB%8B%E7%BB%8D/">数据集介绍</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/10/python%20work/%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E5%9F%BA%E7%A1%80/">聊天机器人基础</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="gal-sets">
        <div class="panel panel-gal hidden-xs" data-aos="fade-up" data-aos-duration="2000">
            <ul class="nav nav-pills pills-gal">

                
                <li>
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/index.html#sidebar-tags" data-toggle="tab" id="tags-tab">热门标签</a>
                </li>
                
                
                <li>
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/index.html#sidebar-friend-links" data-toggle="tab" id="friend-links-tab">友情链接</a>
                </li>
                
                
                <li>
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/index.html#sidebar-links" data-toggle="tab" id="links-tab">个人链接</a>
                </li>
                
            </ul>
            <div class="tab-content">
                
                <div class="cloud-tags tab-pane nav bs-sidenav fade" id="sidebar-tags">
    
    <a href="/tags/py-study/" style="font-size: 17.171866726346778px;" class="tag-cloud-link">py_study</a>
    
    <a href="/tags/nlp/" style="font-size: 15.054326631755249px;" class="tag-cloud-link">nlp</a>
    
    <a href="/tags/Graduation-work/" style="font-size: 9.5366188869369px;" class="tag-cloud-link">Graduation work</a>
    
    <a href="/tags/work/" style="font-size: 13.661314687690549px;" class="tag-cloud-link">work</a>
    
    <a href="/tags/hexo/" style="font-size: 12.484148545152724px;" class="tag-cloud-link">hexo</a>
    
    <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" style="font-size: 16.74819653003934px;" class="tag-cloud-link">-个人博客搭建</a>
    
    <a href="/tags/malab-%E6%AF%95%E4%B8%9A/" style="font-size: 18.427057121715272px;" class="tag-cloud-link">-malab -毕业</a>
    
    <a href="/tags/python-%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" style="font-size: 19.294289462980505px;" class="tag-cloud-link">-python -人工智能</a>
    
    <a href="/tags/python/" style="font-size: 14.777865995256036px;" class="tag-cloud-link">python</a>
    
    <a href="/tags/python/" style="font-size: 14.875920698650102px;" class="tag-cloud-link">-python</a>
    
    <a href="/tags/mathematical-modeling/" style="font-size: 13.053748722588418px;" class="tag-cloud-link">mathematical modeling</a>
    
    <a href="/tags/statistical-learning/" style="font-size: 13.935317321941163px;" class="tag-cloud-link">statistical learning</a>
    
</div>
                
                
                <div class="friend-links tab-pane nav bs-sidenav fade" id="sidebar-friend-links">
    
    <li>
        <a href="http://kdays.net/days/" target="_blank">KDays Forum</a>
    </li>
    
    <li>
        <a href="http://www.gal123.com/" target="_blank">绅士导航♂</a>
    </li>
    
    <li>
        <a href="http://www.moe123.com/" target="_blank">萌导航</a>
    </li>
    
</div>
                
                
                <div class="links tab-pane nav bs-sidenav fade" id="sidebar-links">
    
    <li>
        <a href="https://github.com/ZEROKISEKI/" target="_blank">Github</a>
    </li>
    
    <li>
        <a href="https://coding.net/u/SORA1" target="_blank">Coding</a>
    </li>
    
    <li>
        <a href="https://www.zhihu.com/people/aonosora/activities" target="_blank">知乎</a>
    </li>
    
</div>
                
            </div>
        </div>
    </aside>
    
</aside>
            </div>
        </div>
    </div>
    <footer id="gal-footer">
    <div class="container">
        Copyright © 2018 esy Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>.&nbsp;Theme by <a href="https://github.com/ZEROKISEKI" target="_blank">AONOSORA</a>
    </div>
</footer>

<!-- 回到顶端 -->
<div id="gal-gotop">
    <i class="fa fa-angle-up"></i>
</div>
</body>

<script src="/js/activate-power-mode.js"></script>

<script>

    // 配置highslide
	hs.graphicsDir = '/js/highslide/graphics/'
    hs.outlineType = "rounded-white";
    hs.dimmingOpacity = 0.8;
    hs.outlineWhileAnimating = true;
    hs.showCredits = false;
    hs.captionEval = "this.thumb.alt";
    hs.numberPosition = "caption";
    hs.align = "center";
    hs.transitions = ["expand", "crossfade"];
    hs.lang.number = '共%2张图, 当前是第%1张';
    hs.addSlideshow({
      interval: 5000,
      repeat: true,
      useControls: true,
      fixedControls: "fit",
      overlayOptions: {
        opacity: 0.75,
        position: "bottom center",
        hideOnMouseOut: true
      }
    })

    // 初始化aos
    AOS.init({
      duration: 1000,
      delay: 0,
      easing: 'ease-out-back'
    });

</script>
<script>
	POWERMODE.colorful = 'true';    // make power mode colorful
	POWERMODE.shake = 'true';       // turn off shake
	// TODO 这里根据具体情况修改
	document.body.addEventListener('input', POWERMODE);
</script>
<script>
    window.slideConfig = {
      prefix: '/imgs/slide/background',
      ext: 'jpg',
      maxCount: '6'
    }
</script>

<script src="/js/hs.js"></script>
<script src="/js/blog.js"></script>



<script src="/js/oni.js"></script>




</html>